import wy from '@/utils/axios/wy'
import address from "@/utils/axios/address";


// 获取详细商品信息
export function getDetailApi(id: string) {
    return wy.request({
        url: `/goods?id=${id}`,
        method: 'GET'
    })
}

//详细商品轮播
export function getDetailBannerApi(id: string, limit: string = '16') {
    return wy.request({
        url: `/goods/relevant?id=${id}&limit=${limit}`,
        method: 'GET'
    })
}

//当天热门
export function getHotApi(id: string, limit: string = '3') {
    return wy.request({
        url: `/goods/hot?id=${id}&limit=${limit}&type=1`,
        method: 'GET'
    })
}

//周热门
export function getWeekHotApi(id: string, limit: string = '3') {
    return wy.request({
        url: `/goods/hot?id=${id}&limit=${limit}&type=2`,
        method: 'GET'
    })
}

//地址信息
export function getAddressApi() {
    return address.request({
        url: `https://yjy-oss-files.oss-cn-zhangjiakou.aliyuncs.com/tuxian/area.json`,
        method: 'GET'
    })
}